


public static void main(String[] args) 
{
		    Scanner sc = new Scanner(System.in);
		    int n=sc.nextInt();
		    Object[] str=new Object[n];
		    for(int i=0;i<n;i++)
		    {
		    	String in=sc.next();
			    if(in.equals("c"))
			    	str[i]=new Computer();
			    else if(in.equals("d"))
			    	str[i] =new Double(sc.nextDouble());
			    else if(in.equals("i"))
			    	str[i]=new Integer(sc.nextInt());
			    else if(in.equals("s"))
			    	str[i]=new String(sc.next());
			    else 
			    	str[i]=null;
		    } 
		    for(int i=n-1;i>=0;i--){
		    	if(str[i]!=null)
		    		System.out.println(str[i]);
		    }
	
}
